package cn.tedu.boot04.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class BMIController {
    @RequestMapping("/bmi")
    public String bmi(double h,double w){
        double bmi = w/(h*h);
        System.out.println(bmi);
        if(bmi<18.5){
            return "偏瘦!";
        }
        if(bmi<24){
            return "健康!";
        }
        if(bmi<28){
            return "微胖!";
        }
        return "胖了!";
    }
}
